package com.xyyl.patient.mapper.user;

import com.xyyl.patient.entity.base.BindAxbEntity;
import com.xyyl.patient.core.mapper.GenericMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @projectName:xyyl-patient
 * @ClassName: BindAxb
 * @Description:BindAxb
 * @author @author kellie
 * @date 2018-05-25 14:22:28
 */
public interface BindAxbMapper extends GenericMapper {
    //根据拨打人手机号查绑定
    @Select("select subs_id AS subsId,a_phone AS aPhone,b_phone AS bPhone,secret_phone AS secretPhone,add_time AS addTime,exp_time AS expTime from xyyl_bind_axb WHERE a_phone=#{aPhone}")
    List<BindAxbEntity>  selectAxbList(@Param("aPhone") String aPhone);

    //根据拨打人手机号,和接听人 ,查绑定
    @Select("select subs_id AS subsId,a_phone AS aPhone,b_phone AS bPhone,secret_phone AS secretPhone,add_time AS addTime,exp_time AS expTime from xyyl_bind_axb WHERE a_phone=#{aPhone} and b_phone=#{bPhone}")
    BindAxbEntity  selectAxbObject(@Param("aPhone") String aPhone, @Param("bPhone") String bPhone);
}
